/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const nestedRouter = {
  path: '/nested',
  component: Layout,
  redirect: '/nested/menu1/menu1-1',
  name: 'Nested',
  meta: {
    title: '系统管理',
    icon: 'nested'
  },
  children: [
    {
      path: 'user',
      name: 'user',
      component: () => import('@/views/user/index.vue'),
      meta: { title: '用户管理' }
    },
    {
      path: 'menu',
      name: 'menu',
      component: () => import('@/views/menu/index.vue'),
      meta: { title: '菜单管理' }
    },
    {
      path: 'roles',
      name: 'roles',
      component: () => import('@/views/role/index.vue'),
      meta: { title: '角色管理' }
    },

    // 往这里加！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！！
    // {
    //   path: 'menu1',
    //   component: () => import('@/views/nested/menu1/index'), // Parent router-view
    //   name: 'Menu1',
    //   meta: { title: 'Menu 1' },
    //   redirect: '/nested/menu1/menu1-1',
    //   children: [
    //     {
    //       path: 'menu1-1',
    //       component: () => import('@/views/nested/menu1/menu1-1'),
    //       name: 'Menu1-1',
    //       meta: { title: 'Menu 1-1' }
    //     },
    //     {
    //       path: 'menu1-2',
    //       component: () => import('@/views/nested/menu1/menu1-2'),
    //       name: 'Menu1-2',
    //       redirect: '/nested/menu1/menu1-2/menu1-2-1',
    //       meta: { title: 'Menu 1-2' },
    //       children: [
    //         {
    //           path: 'menu1-2-1',
    //           component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
    //           name: 'Menu1-2-1',
    //           meta: { title: 'Menu 1-2-1' }
    //         },
    //         {
    //           path: 'menu1-2-2',
    //           component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
    //           name: 'Menu1-2-2',
    //           meta: { title: 'Menu 1-2-2' }
    //         }
    //       ]
    //     },
    //     {
    //       path: 'menu1-3',
    //       component: () => import('@/views/nested/menu1/menu1-3'),
    //       name: 'Menu1-3',
    //       meta: { title: 'Menu 1-3' }
    //     }
    //   ]
    // },
    {
      path: 'dept',
      name: '部门管理',
      component: () => import('@/views/nested/dept/index'),
      meta: { title: '部门管理' }
    },
    {
      path: 'post',
      name: '岗位管理',
      component: () => import('@/views/nested/post/PostView'),
      meta: { title: '岗位管理' }
    },
    {
      path: 'dictionary',
      name: 'Dictionary',
      component: () => import('@/views/dictionary/index'),
      meta: { title: '字典管理' }
    },
    {
      path: 'log',
      name: 'Log',
      component: () => import('@/views/log'),
      meta: { title: '日志管理' },
      children: [
        {
          path: 'operation_log',
          component: () => import('@/views/log/operation_log/index'),
          name: 'OperationLog',
          meta: { title: '操作日志' }
        },
        {
          path: 'login_log',
          name: 'LoginLog',
          component: () => import('@/views/log/login_log/index'),
          meta: { title: '登入日志' }
        }
      ]
    },
    {
      path: 'dictionaryData',
      name: 'DictionaryData',
      hidden: true,
      component: () => import('@/views/dictionary_data/index'),
      meta: { title: '字典数据' }
    }
  ]
}

export default nestedRouter
